package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.HashMap;

/**
 * 字典明细表
 */
@Getter
@Setter
@ToString
public class SystemDictionaryItem {
    /**
     * 主键
     */
    private Long id;
    /**
     * 标题
     */
    private String title;
    /**
     * 序列
     */
    private Integer sequence;
    /**
     * 关联字典目录
     */
    private SystemDictionary sd = new SystemDictionary();

    /**
     * 获取json数据
     *
     * @return
     */
    public String getJson() {
        HashMap map = new HashMap();
        map.put("id", id);
        map.put("title", title);
        map.put("sequence", sequence);
        map.put("sdId", sd.getId());
        return JSON.toJSONString(map);
    }

}